package com.shangbang.verb.controller.recruit;

import com.shangbang.verb.core.BaseResponse;
import com.shangbang.verb.service.recruit.CarouselService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Api(value = "轮播图操作类接口", tags = "轮播图相关接口", description = "轮播图的相关操作")

@RestController
@RequestMapping(value = "/recruit/carouse")
public class CarouselController {

    @Autowired
    private CarouselService carouselService;

    /**
     * 获取轮播图列表
     * @param request
     * @param response
     * @return
     */
    @ApiOperation(value = "获取轮播图接口",notes = "无需传入参数")
    @ApiResponses({ @ApiResponse(code = 0, message = "操作成功"),
            @ApiResponse(code = -1, message = "操作失败") })
    @RequestMapping(value = "/getCarouselList", method = {RequestMethod.POST, RequestMethod.GET})
    public BaseResponse getCarouselList(HttpServletRequest request, HttpServletResponse response) {
        Object result = "";
        Integer code = 0;
        String msg = "成功";

        result =  carouselService.getCarouselList();


        return new BaseResponse(code, msg, result);
    }




}
